<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>拼接内容</title>
    <style>
        
    </style>
</head>

<body>
    <input type="text" class="txt"/>
    <button class="btn">复制</button>
    <script>
        const txt=document.querySelector(".txt");
        const btn=document.querySelector(".btn");
        btn.addEventListener("click",(e)=>{
            console.log(txt.value);
            navigator.clipboard.writeText(txt.value+"拼接内容");
        })
    </script>

</body>

</html>